An integrated framework of ground source heat pump utilisation for high-performance buildings

CO2 emissions from building operations have increased to their highest level globally, moving away from the Paris Agreement goal of below 2 °C. While geothermal is recognised as a promising renewable source, the lack of an integrated framework guiding investigating ground source heat pumps for building operations, along with the incapability of well-known simulation tools in accurately capturing ground thermal performance, hinders its application. This research aims to unlock ground source heat pumps for building operations through an integrated framework, including an overarching improved U.S. National Renewable Energy Laboratory (NREL) monitoring guideline, a sensor-based monitoring prototype, and a g-function-based simulation approach. This research proposes amendments and improvements to the NREL guideline for monitoring geothermal energy by separating Thermal Energy Net Production from Thermal Energy Gross Production. A state-of-the-art case building located in Melbourne, Australia, housing advanced technologies, including ground source heat pump systems, is used to demonstrate and validate the research framework. A typical winter month in the southern hemisphere, July 2021, is monitored for the ground source heat pump systems designed and used for space heating. The findings reveal that the thermal energy generation during working days in July 2021 is close to the simulation results, with a difference of 2.2% in gross thermal energy production and a difference of 0.92% in inlet temperature. This research develops and validates an integrated approach for evaluating ground source heat pump systems, contributing to the utilisation of geothermal energy for building operations.

Background. CO 2 emissions from building operations increased to their highest level of around 10 GtCO 2 , or 28% of total energy-related CO 2 emissions globally in 2019, which moved away from the Paris Agreement goal of keeping the global mean temperature rise to well below 2 °C 1 . Recent global trends and discussions related to climate change underscore the need to replace fossil fuels with renewable energy sources through existing and emerging technologies 2 . Many researchers have confirmed the enormous potential of geothermal energy both as a source of electricity and as a heating/cooling geosystem. Lund and Toth (2021) provided a worldwide review of the direct utilisation of geothermal energy, and concluded that the direct utilisation at the end of 2019 reached 107,727MWt, a 52.0% increase over the 2015 data 3 . Huang (2012) also explored geothermal energy in China, and concluded that the potential of generating power from geothermal energy in China is vast, but it is yet largely untapped 4 . Geothermal energy provides significant opportunities for high-performance buildings that require green energy for building operations. UNECE (2022) describes the role of high-performance buildings as 'reducing the energy requirements of buildings to a point at which residual needs can be met by no or lowcarbon energy sources' 5 . Renewable energy sources such as wind and solar have gained prominence in recent years. However, while geothermal energy is widely recognised as one of the most promising and ubiquitous renewable sources, the lack of performance evaluations publicly available hinders its application 6 . For example, although it has been identified that the geothermal potential in Australia is 26,000 times the nation's annual primary energy consumption, the utilisation of geothermal is limited 7 . With the trends of subsidised geothermal energy installations 8 , it is worthwhile to investigate its potential for high-performance buildings.
Ground source heat pump systems. A GSHP system couples a heat pump with one or more ground heat exchangers (GHEs) in boreholes or trenches to transfer the ground thermal energy into the building. Figure 2 illustrates a general scheme of a GSHP system, which consists of three main components: (1) a geothermal heat pump unit, as the interface between indoor and outdoor sources, to modify the cycling medium temperature;  Schematics of a typical GSHP system (adopted from Ruiz-Calvo et al. 13 ). www.nature.com/scientificreports/ (2) an air-conditioning end system that deals with building heating/cooling loads; and (3) heat exchange systems that are buried underground to facilitate heat extraction 13 . There are two types of systems for implementing the GHEs: (1) open systems that use groundwater as the medium for heat exchange, in which there are no barriers between the groundwater and the soil (Fig. 3A,B); and (2) closed systems that, unlike open systems, employ a heat medium inside the heat exchangers, where the heat exchangers are separated from the soil by either vertical boreholes or horizontal trenches (Fig. 3C,D) containing high-density circulation pipes and a medium to carry heat (usually is water). Vertical GHEs outperform their horizontal counterparts for several reasons, such as less area required for installation and higher energy efficiency 14 , while the only disadvantage is the high initial cost of piping, borehole drilling, and refilling. Given the proven benefits, the most commonly-used mechanism is a closed vertical GHE (with a U-tube installed inside each borehole) 15 . It should be noted that, in cooling-dominated climates, heat pumps inject heat at higher temperatures into the soil in summer and cause temperature rises in the soil, which results in the cooling performance of GSHPs usually being lower than its heating performance 16 . In this regard, several studies have suggested coupling GSHPs with auxiliary energy source devices (hybrid GSHPs) such as cooling towers to overcome the temperature imbalance 17,18 . GSHP monitoring and guidelines. Research has suggested that it is vital to monitor the long-term performance to ensure the efficiency and reliability of GSHP systems and avoid potential problems, such as insufficient thermal energy 19 and frozen pipes 20 . Although a number of experimental studies have been conducted worldwide, most of these studies have focused on the monitoring-based evaluation of the coefficient of performance (COP) of GSHPs 21,22 , where the overall COP of heat pumps is the ratio of the thermal energy output to the energy input required by the compressor. In addition to calculating the COP of GSHPs, a few studies have highlighted the existing challenges of GSHP metering and monitoring, such as incorrect temperature sensor installations, that can significantly affect the measuring and metering scheme 23 . To this end, Spitler et al. (2021) conducted a long-term monitoring study of a GSHP system performance as part of the international energy research and innovation program in buildings and communities, namely IEA-EBC Annex 52, towards netzero energy buildings (NZEBs) 24 . This research focused on uncertainty analysis to understand the monitored measures and their associated errors due to the installed sensors. However, its application in simulation-based workflows is still unknown, and additional case studies with recent climatic changes are required to investigate the GSHP's performance. Guidelines on monitoring the performance of GHSPs are also imperative. For example, the national standard in China (GB/T 50801-2013) evaluates the geothermal technology performance in three grades based on the energy efficiency of the entire system (EER) and suggests that monitoring should be performed a minimum of 15 days after the system becomes operational and maintained for at least 4 continuous days in order to obtain accurate results 25 . Notwithstanding these examples of national standards, each jurisdiction tends to apply different regulations for geothermal energy sources, and thus a common definition and framework has yet to be established 26 . As such, Lu et al. 21 , have concluded that there is an urgent need to develop a set of principles for the design and operation of GSHPs, as supplementary guidelines on the basis of existing industry standards, among which the guideline provided by the National Renewable Energy Laboratory (NREL) 27 can be referred to for geothermal monitoring worldwide.
Therefore, there remains a lack of an integrated monitoring framework accompanied by overarching guidelines. Given the lack of an integrated monitoring framework, underscored by the literature review above, the development of an integrated monitoring framework accompanied by an overarching guideline for investigating GSHP systems is imperative. GSHP simulation. The importance of performance simulation during the design stage of a project is already well established, and the absence of such tools would pose significant challenges in efforts to design sophisticated, energy-efficient, and environmentally-friendly buildings 28 . In recent decades, many studies have investigated the potential of GSHPs using software modelling and artificial intelligence to predict performance and obtain optimal technical configurations 29,30 . Soil properties, building loads, and meteorological data have been found to be the main factors influencing the design and performance of GSHP systems 31 , while the heat transfer calculation process in GHEs was found to be challenging due to uncertain factors, such as ground ther- www.nature.com/scientificreports/ mal properties and groundwater flow rate, over a period 32 . However, most of the available simulation programs, such as TRNSYS (a graphics-based software environment used to simulate the behaviour of transient systems, such as thermal and electrical energy systems) and EnergyPlus (a whole building energy simulation program used to model energy performance), are not sufficiently developed to accurately capture the ground thermal performance (e.g., temperature distribution or heat capacity) or the interaction between GHEs, especially during operation 33,34 . Cimmimo (2018) has noted that, while GSHP simulations intended to predict the returning fluid temperatures from the boreholes as well as the ground temperatures in the bore field, failure to predict the temperatures accurately would compromise the accuracy of any subsequent GSHP performance analysis and system design efforts, especially in the case of horizontal GHEs, where they are more subject to ground surface temperatures due to sun exposure and ambient conditions 35 . Accordingly, numerical design methods have been proposed to model and simulate the heat exchanger response for the purpose of predicting ground temperatures from specific bore field configurations. The most widely used method, developed by Eskilson, is called 'g-function' 36 . G-function is also referred to as a thermal response factor that allows for accurate dynamic temperature calculations of the fluid and ground during the design period, facilitating the prediction of the GSHP system performance and components' sizing 37 . This method was used by the American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) direct design method for modelling 38 , and several studies have implemented g-functions as model inputs to building simulation tools to predict GSHP and building energy performance on an annual or hourly basis 39,40 . Other EnergyPlus-based applications using g-functions for modelling the bore field performance of the GSHP system include GLHEPro and Earth Energy Designer (EED), and even the official DesignBuilder documentation recommends computing g-functions externally and adjusting them according to the simulation procedure 41 .
However, the g-function method is limited by several assumptions that may affect its accuracy, including (1) that the boreholes in the bore field are of equal dimension (i.e., length and radius), (2) that the boreholes are connected in parallel, with no series interconnections, and (3) that the boreholes in the field are uniformly spaced 42,43 . In most practical systems, these assumptions do not hold, meaning that the computed g-functions may be inaccurate, and this can have a significant impact on the long-term ground temperature simulation. Cimmino and Bernier thus presented a method to compute g-functions for boreholes connected in any configuration of series and parallel connections 44 . The modified g-function method is available to use as a Python-based package 45 .
Research objectives. As underscored by the literature review, geothermal energy could potentially be a great source for high-performance buildings, with less carbon footprint and lower operational costs. However, an integrated framework for evaluating GSHP systems through performance monitoring and simulation has yet to be established. Furthermore, the incapability of well-known simulation tools in accurately capturing ground thermal performance also hinders its application. Therefore, this paper proposes an integrated framework for evaluating the performance of GSHP systems, unlocking geothermal energy utilisation for high-performance buildings. The objectives underlying the research presented in this paper are to: • Improve and amend the NREL guideline for the monitoring of geothermal energy; • Develop a sensor-based monitoring framework for evaluating the actual energy performance of GSHP systems, aligning with the monitoring guideline; and • Identify and validate a ubiquitous and effective approach for the energy simulation of GSHP systems based on monitored data.
A state-of-the-art building located in Melbourne, Australia, is used as a case study to demonstrate the proposed framework, where the uniqueness of the geothermal application provides opportunities for research innovation in this paper. This research is to unlock GSHP utilisation through an integrated framework, including an overarching improved monitoring guideline, a monitoring prototype and instrument, and a g-function-based simulation approach, thereby advancing the utilisation of geothermal energy in high-performance buildings worldwide.

Methods
The methodology underlying this research comprises four interconnected pillars, as illustrated in Fig. 4: (1) the first pillar analyses the US NREL guideline and provides the rationale for the improvement based on the analysis, (2) the second pillar outlines the monitoring framework and metrics for monitoring GSHP systems, (3) the third pillar covers the simulation-based workflow performed in this research, and (4) the fourth pillar validates the simulation results against field measurements collected in the second pillar, based on the developed simulationbased method in a real case building in Melbourne, Australia.

Content analysis.
Appropriate guidelines are imperative for monitoring the performance of GSHP systems. As discussed in the literature, the NREL guideline in the U.S. is the closest one to what could be considered a universal guide for GSHP system applications and particularly for measuring building energy performance 42 . The NREL guideline categorises geothermal energy generation as part of Facility Energy Production, which is defined as the 'Total of all energy produced at the facility and either used at the facility or sold for use elsewhere, excluding losses within the energy production systems.
[It] includes Thermal Energy Production and electrical energy produced by PV, wind, geothermal, or other means, minus Electrical Generation System Losses. ' Thermal Energy Production, meanwhile, is defined as the 'Thermal energy generated at the facility by means such as solar thermal or geothermal, to the extent that the energy is used at the facility in a way that offsets the www.nature.com/scientificreports/ consumption of purchased energy or other energy generated at the facility. ' However, the monitoring protocol is still not sufficiently explained in the NREL guideline. For example, it does not address (1) whether the thermal energy production of GSHP systems should be measured at the inlets or outlets of GSHPs, despite the fact that this is an important consideration in characterising the relationship between the thermal energy production and electricity consumption by GSHPs; or (2) what should be measured for the purpose of assessing the thermal energy production if the electricity consumption by GSHPs is not monitored separately. Therefore, a number of amendments and improvements to the guideline for the energy monitoring of GSHP systems are proposed, as described below.
For the purpose of this research, it should be noted, Thermal Energy Gross Production is defined as the overall thermal energy generation that can be directly used for building operation, and it can be monitored at the outlet points of GSHPs, as illustrated in Fig. 5. Based on the first law of thermodynamics, the energy used by the GSHP also contributes to the gross generation through energy conversion. Therefore, Thermal Energy Net Production is defined as Thermal Energy Gross Production minus the electrical consumption of geothermal heat pumps, and it can be monitored at the inlet points of GSHPs, as illustrated in Fig. 5. Thermal Energy Net Production, Thermal Energy Gross Production, and electrical consumption of GSHPs have the following relationship (Eq. 1).
As such, when there are dedicated submeters for Thermal Energy Gross Production and the electrical consumption of GSHPs, Thermal Energy Net Production can be derived using Eq. (1). Similarly, when there are dedicated submeters for Thermal Energy Net Production and the electrical consumption of GSHPs, Thermal Energy Gross Production can also be derived using Eq. (1). However, in most buildings, there are no dedicated submeters to monitor the electrical consumption of a GSHP individually, and instead, the electrical consumption of a GSHP is usually monitored together with other components. In this scenario, the thermal energy generation can only be monitored by positioning thermal meters at the inlet points of GSHPs to monitor the Thermal Energy Net Production. Otherwise, the thermal energy generation will be overcounted by incorporating the energy conversion of electrical consumption of GSHPs.  www.nature.com/scientificreports/ Performance monitoring. To evaluate the actual performance, an intelligent monitoring prototype for GSHP systems that align with the guidelines available must be developed. Compared to those for other renewable energy systems, such as solar PV, the monitoring systems for geothermal technologies are less developed and need to be customised for specific buildings. Therefore, a monitoring prototype that uses thermal meters and temperature sensors, along with data loggers or a Building Management System (BMS), is proposed for GSHP systems in this research. The actual energy generation can be acquired from the thermal meters.
In the NREL guideline, the gross energy generation from GSHPs is used as the indicator of energy generation; however, based on the first law of thermodynamics, the energy used by the GSHP also contributes to the gross generation through energy conversion. Therefore, the monitoring prototype proposed in this research incorporates key considerations for the instrument design and installation, including (1) measurement metrics, i.e., what should be measured to achieve the research objectives; and (2) installation locations, i.e., where to install the instrument to monitor the performance, based on monitoring objectives and in alignment with the improved monitoring guideline. Moreover, in this research, both thermal energy and temperature are evaluated and validated, with the instrument locations aligned with the simulation outputs for validation purposes. In this regard, thermal meters are installed at the outlet points of the supply side of the GSHP systems in order to monitor the Thermal Energy Gross Production. Additional temperature sensors are also installed at the inlet points of the source side of the GSHP systems to monitor the temperature of water circulated from underground, representing the thermal response of the water loops.
Performance simulation. To address the identified research gap, third-party g-function computations for GHE modelling are conducted; the results are then integrated into the building simulation tool, DesignBuilder, for the subsequent energy performance analysis of GSHP systems. This research will also examine the impact of independently computed g-function data on the energy performance simulations/analysis, this being achieved through comparison and validation with the monitored results.
In this research, the g-function approach proposed by Cimmino (2014) is used to simulate the thermal response of the boreholes, based on effective borehole wall temperature 44 . Effective borehole wall temperature is defined based on inlet fluid temperature and effective bore field thermal resistance. These g-functions are then superimposed in time to obtain the effective borehole wall temperature variation due to variable heat extraction rate in the bore field as per the expression below 37 : where T * b represents the effective borehole wall temperature, T 0 indicates the undisturbed ground temperature, Q ′ denotes the average heat extraction rate per unit borehole length, and g represents the g-function of the bore field. The effective borehole wall temperature is related to the mean fluid temperature in the bore field through the bore field thermal resistance as expressed below 37 : where T f = 0.5 T f,in + T f,out represents the arithmetic mean of the inlet and outlet fluid temperature in the bore field, and R * field represents the effective bore field thermal resistance. A Python-based platform, Pygfunction, is then employed to calculate g-functions 45 . Pygfunction, it should be noted, is a Python module used for the modelling of geothermal bore fields and subsequent computation of the thermal response factors, or g-functions, for these borehole fields 46 . It is based on the analytical finite line source www.nature.com/scientificreports/ solution for the evaluation of the thermal interference between boreholes in the same bore field, which allows for the rapid calculation of g-functions. Pygfunction can be used to predict variations in borehole temperature and in the evaluation of borehole fluid temperatures. The notable feature of Pygfunction absent in comparable tools is that it allows for the calculation of interconnected boreholes of different lengths and radius. In this respect, the first step in computing the g-function for any given bore field using Pygfunction is to create the model representation of the bore field using the Pygfunction Boreholes and Networks modules. However, to model precise borehole placements, a correctly formatted .txt file containing the coordinates, depth, and radius is required. The borehole coordinate data can be extracted from the AutoCAD (or other drafting software) drawings for the bore field and used to populate a formatted text (.txt) file. For this purpose, the Boreholes module in the Pygfunction contains information regarding the dimensions and positions (coordinates) of boreholes. Several different example Python scripts can be run for the modelling of regular bore field shapes, including L-shaped, U-shaped, and circular bore field configurations.
Series interconnections among the boreholes in the field also need to be modelled in the Networks module within Pygfunction, which is a critical feature of Pygfunction compared with other tools. This module is used to model the series, parallel, and mixed networks/interconnections between boreholes in the field. Ensuring that the network layout is simulated exactly as-built is paramount to obtaining an accurately computed g-function, and this function represents a key difference between Pygfunction and other modelling and computational methods, which are limited in terms of their capacity to handle complexities within the borehole interconnections and loops. The innovative methodology proposed in this research endeavours to fill this largely unaddressed gap.
In the Networks module within Pygfunction, the 'bore_connectivity' variable is used for the creation of the networked model. The variable can be created using the following rules, as outlined in the instructions: "Index of the fluid inlet into each borehole where − 1 represents a borehole connected to the bore field inlet. If this parameter is not provided, parallel connections between boreholes are used. Default is None. " For example, for a bore field with 6 boreholes (labelled 0 to 5) connected in two circuits (0-1-2 and 3-4-5), the result would be: bore_connectivity = [− 1, 0, 1, − 1, 3, 4], where − 1 indicates that the borehole is connected to the field inlet. The borehole model and networked model created can also be visualised using Python scripts.
After creating the bore field model based on the Pygfunction, the next step is to perform the g-function computations for the given bore field configuration. The g-function module within Pygfunction is used for this purpose. The configuration and properties of the boreholes in the field are defined using the Boreholes module, and the g-function module is then used to compute the g-function. G-functions, it should be noted, can be computed for fields with equal inlet fluid temperature conditions, fields with mixed inlet fluid temperatures, uniform heat extraction along boreholes, and uniform borehole wall temperature. For mixed inlet fluid temperatures due to the series connections between the boreholes in each circuit or network, the following parameters are used to calculate the g-function for a bore field: (1) list of boreholes included in the bore field; (2) inlet mass flow rate into each circuit of the network, m_flow (kg/m 2 ); (3) fluid specific isobaric heat capacity, cp (J/kg°C); and (4) soil thermal diffusivity, alpha (m 2 /s).
Finally, the computed g-function is imported to a simulation tool that accommodates g-functions for the simulation of GSHP systems. An EnergyPlus-based software, DesignBuilder, is one of the tools that use g-functions for the energy simulation of GSHP systems. A wide range of heat pumps is made available for users to modify the heating and cooling components, flow rate, heating capacity, heating compressor power coefficients, and so on. Moreover, the GHE component data is modelled through a simple dialogue box as part of the DesignBuilder HVAC system. Meanwhile, the computed g-function data is imported into the DesignBuilder program to carry out the energy performance analysis and simulate ground inlet/outlet temperatures.

Performance validation.
As part of the validation procedure, the thermal energy gross production and the inlet temperature of the source side of the GSHP systems are simulated using DesignBuilder, and these are then compared with the field measurements outlined in "Performance monitoring" section. Validation of the simulation approach provides a solid foundation for the implementation of the framework proposed in this research. In this respect, a leading zero energy building (ZEB) in Melbourne is selected as a case study. The average temperature of this building location is illustrated for each month in Fig. 6. A ZEB, it should be noted, is defined as a building generating as much energy from renewable sources as it consumes on an annual basis and requiring zero energy from fossil fuels on an annual basis during operation. The case building uses a combination of renewable technologies, including geothermal, solar PV, and solar thermal, to achieve the zero-energy building goal, and it is the first building in Australia to use building foundation screw piles for geothermal energy generation. Other technologies used in this building include in-slab hydronic heating, packaged air conditioning (PAC) units, fan coil units, and evaporative cooling. There are two GSHPs connected to the geothermal ground heat exchangers extracting thermal energy for building heating purposes. The case building and the geothermal plant room are illustrated in Fig. 7. The uniqueness of the geothermal application in this climate provides opportunities for research innovation, as described in this paper. Thus, the developed research framework is applied to this case building in order to better understand and advance geothermal energy utilisation, including through performance monitoring and energy simulation and the proposed monitoring guideline improvements.

Case study and results
The geothermal bore field comprises 220 boreholes integrated with ground heat exchangers, installed at two different depths (192 boreholes installed at a depth of 13 m below ground, and 28 boreholes installed at a depth of 100 m below ground). The borehole layout for the building is shown in Fig. 8. The 220 ground heat exchangers are built into 13 circuits, with each circuit featuring several boreholes interconnected serially, resulting in mixed inlet fluid temperatures due to the series connections between the boreholes in each circuit or network. www.nature.com/scientificreports/ Performance simulation. The geothermal bore field modelled in Pygfunction is illustrated in Fig. 9, while the bore field network layout is displayed in Fig. 10. Based on the parameters required for mixed inlet fluid temperatures, the Python script is used to calculate the g-function for the case building, with the resulting g-functions presented in Fig. 11. Finally, for the purpose of performance analysis using the EnergyPlus-based program, DesignBuilder V7 45 , the g-function data computed using Pygfunction is imported into the program. The input data file (IDF) editor in EnergyPlus can be used for this purpose, or a simple copy-paste command can be used to transfer the computed  www.nature.com/scientificreports/ g-function. Based on the computed g-function, the thermal energy generation and the inlet temperature of the GSHPs at the supply side, which reflect the thermal response of water loops from underground, are simulated.
Performance monitoring. To evaluate the actual performance, the developed monitoring instrument is installed in the case building in accordance with the improved guideline. To achieve the research objectives for this case building, both thermal energy and temperature are measured for evaluation and validation purposes. Based on the proposed monitoring framework, a customised monitoring instrument is designed and installed for the case building, with the key considerations for the instrument design and installation in this research including: (1) measurement metrics, i.e., gross thermal energy production, and the inlet temperature of the GSHPs; and (2) installation locations, these being determined in accordance with the improved monitoring guideline and the simulation outputs for validation purposes. In this research, thermal meter kits are installed at the outlet points of the supply side of the GSHPs to monitor the gross thermal energy generated. Additional temperature sensors are installed at the inlet points of the source side of the GSHPs to monitor the water temperature circulated from underground, as this represents the thermal response of the water loops. The installation locations are illustrated in Fig. 12. The monitored data is stored in the BMS, where it is readily accessible and downloadable. The collected data is used for energy performance evaluation and validation against the simulation results, as described below.
Comparison and validation. Given that the two GSHPs are used for space heating in the winter season but then are switched off for most of the summer season, the data collected during a typical winter month, July, is used for analysis and validation in this research. The gross thermal energy generated from the monitored GSHPs during working days in July 2021 is listed in Table 1 and plotted in Fig. 13. The overall difference between the monitored and simulated energy production is 2.2%, with the Mean Absolute Deviation (MAD) of 150.3. www.nature.com/scientificreports/ The hourly inlet temperature of the GSHPs was monitored for the same month, i.e., July 2021. The average simulated temperature based on the computed g-function for July is found to be 15.14 °C, while the average monitored temperature is 15.00 °C, resulting in a difference of 0.92% in inlet temperature. The results and comparison between the simulated and monitored data demonstrate and support the efficacy of the overall framework proposed in this research.

Discussion
Building operations have increased to their highest level at around 10 GtCO 2 , or 28% of total global energyrelated CO 2 emissions globally. Given the overall carbon budget and the current CO2 emissions trends from building operations, the global temperature could possibly rise above 2 °C 47 . Geothermal energy provides significant opportunities to reduce the impacts of building operation, and it is receiving increasing attention in sustainable building design worldwide due to their reliability and other reported benefits. However, the lack of an integrated framework guiding the investigation of GSHP systems, along with the incapability of such well-known simulation tools as EnergyPlus in accurately capturing the ground thermal performance, hinders its application.
Guidelines are imperative for monitoring the performance of geothermal technologies, and the NREL guideline in the U.S. is the closest existing one to a comprehensive guide for GSHP applications. The NREL guideline categorises geothermal energy generation as part of Facility Energy Production, i.e., Thermal Energy Production. However, the monitoring protocol in the NREL guideline has yet to be sufficiently explained. For example, it does not address whether the thermal energy production of GSHP systems should be measured at the inlets or outlets of GSHPs, or what should be measured for the purpose of assessing the thermal energy production if the electricity consumption by GSHPs is not monitored separately. Therefore, amendments and improvements to the guideline are required for the energy monitoring of GSHP systems. Furthermore, to evaluate the actual performance of GSHP systems, an intelligent monitoring framework aligned with the improved guidelines needs to be developed.
While the use of GSHPs is becoming more widespread, precise performance simulation is also critical. These systems are typically designed using ground heat exchangers that are linked to heat pumps, and simulation can be used to predict the behaviour and the temperatures from the ground heat exchanger loops. However, most of the available simulation programs, such as TRNSYS (to simulate the transient systems' behaviour) and EnergyPlus (whole-building energy modelling interface), are not sufficiently developed to accurately capture the ground thermal performance (e.g., temperature distribution or heat capacity) or the interaction between GHEs. Accordingly, numerical design methods have been proposed to model and simulate the bore field heat exchanger response, among which 'g-function' developed by Eskilson is the most widely used method. This method was used by www.nature.com/scientificreports/ several studies and applications, including EnergyPlus-based applications such as GLHEPro and DesignBuilder. However, the g-function method is limited by several assumptions, including that the boreholes in the bore field are of equal dimension (i.e., length and radius), which may affect its accuracy. Cimmino and Bernier thus presented a method to compute g-functions for boreholes connected in any configuration of series and parallel connections. The research presented in this paper addresses GSHP utilisation through an integrated framework, including an overarching improved NREL guideline, a sensor-based monitoring prototype and instrument, and a g-function-based simulation approach.

Conclusion
This research proposes amendments and improvements to the NREL guideline for monitoring geothermal energy by separating Thermal Energy Net Production from Thermal Energy Gross Production. Thermal Energy Gross Production is defined as the overall thermal energy generation that can be directly used for building operation, while Thermal Energy Net Production is defined as Thermal Energy Gross Production minus the electrical consumption of geothermal heat pumps. Without these improvements, the thermal energy generation could be overcounted by incorporating the energy conversion of electrical consumption of GSHPs. This research also proposes a monitoring prototype that uses thermal meters and temperature sensors, along with data loggers or a BMS for monitoring. With the key considerations of measurement metrics and installation locations determined based on the research objectives and in alignment with the improved monitoring guideline, thermal meters are installed at the outlet points of the supply side of the GSHP systems to monitor the thermal energy gross production. Additional temperature sensors are installed at the inlet points of the source side of the GSHP systems to monitor the water temperature for the purposes of evaluation and validation. This paper also verifies the modified g-function method for simulating the performance of geothermal technologies. To predict thermal energy generation, this research uses an open-source application called Pygfunction, a Python-based package, for the computation of g-functions. This application overcomes the limitations and assumptions made by other popular computation methods. In particular, a Python script is created to calculate g-functions for any non-uniform, arbitrarily spaced bore field with mixed series and parallel interconnections between boreholes. A state-of-the-art case building located in Melbourne is used to demonstrate and validate the proposed framework. This building comprises 220 boreholes of non-uniform lengths connected in a mixed series-parallel configuration. The developed computational model is able to accommodate the series www.nature.com/scientificreports/ interconnections between boreholes and the non-uniformity of the boreholes in the field (as the boreholes are of varying lengths), and the computed g-functions are used to simulate geothermal production. The simulation results are then compared with the monitored data from the case study building. The findings reveal that: (1) the thermal energy generation during working days in July 2021 is close to the simulation results, with a difference of 2.2% in gross thermal energy production; (2) the average simulated temperature for July is 15.14 °C, and the average monitored temperature is 15.00 °C, resulting in a difference of 0.92% in inlet temperature. As such, the  www.nature.com/scientificreports/ results and comparison between the simulated and monitored data demonstrate the efficacy of the proposed framework. This research contributes to advancing GSHP utilisation by providing an integrated framework, including an overarching improved monitoring guideline, a monitoring prototype and instrument, and a g-function-based simulation approach. This research is subject to several limitations that should be considered when the methodology is employed in other studies. If the GSHP systems are designed for both heating and cooling, a longer study period spanning multiple seasons would be beneficial for evaluating how the system performs in both hot and cold times of the year. Based on long-term monitoring, more comprehensive statistical analysis can be conducted in future research. It will also be beneficial if monitoring guidelines provide guidance on minimum monitoring periods for different design scenarios and purposes, which can be addressed in future research. Another potential avenue of future research would be to investigate more and varied types of cases worldwide, as this would help draw more comprehensive conclusions based on the building type and renewable energy profile of the building under investigation.

Data availability
All data generated or analysed during this study are included in this published article and its supplementary information files. Please contact the corresponding author for data requests from this study. www.nature.com/scientificreports/